From bb6d2f8575a6e8434d796224785fdc68ec3aaf3f Mon Sep 17 00:00:00 2001 From: "smh22@firebug.cl.cam.ac.uk" Date: Tue, 29 Nov 2005 17:59:03 +0100 Subject: [PATCH] Disable some over-zealous sanity checking for now (can cause major problems with live migration to localhost). A proper fix will follow. Signed-off-by: Steven Hand --- tools/examples/block | 51 ++++++++++++++++++++++++-------------------- 1 file changed, 28 insertions(+), 23 deletions(-) diff --git a/tools/examples/block b/tools/examples/block index ff297d82d4..5d101520b2 100644 --- a/tools/examples/block +++ b/tools/examples/block @@ -89,29 +89,34 @@ check_sharing() fi done - for file in /sys/devices/xen-backend/*/physical_device - do - if [ -e "$file" ] # Cope with no devices, i.e. the * above did not expand. - then - local d=$(cat "$file") - if [ "$d" == "$devmm" ] - then - if [ "$mode" == 'w' ] - then - echo 'guest' - return - else - local m=$(cat "${file/physical_device/mode}") - - if expr index "$m" 'w' >/dev/null - then - echo 'guest' - return - fi - fi - fi - fi - done +## +## XXX SMH: the below causes live migration on localhost to fail sometimes +## since the source domain may still appear to be using a local device. +## For now simply comment it out - a proper fix will come in due course. + +# for file in /sys/devices/xen-backend/*/physical_device +# do +# if [ -e "$file" ] # Cope with no devices, i.e. the * above did not expand. +# then +# local d=$(cat "$file") +# if [ "$d" == "$devmm" ] +# then +# if [ "$mode" == 'w' ] +# then +# echo 'guest' +# return +# else +# local m=$(cat "${file/physical_device/mode}") + +# if expr index "$m" 'w' >/dev/null +# then +# echo 'guest' +# return +# fi +# fi +# fi +# fi +# done echo 'ok' } -- 2.30.2